package com.rain.cy.business.model.dto;

import lombok.Data;

/**
 * <p>
 * 患者分数记录
 * </p>
 *
 * @author yuchen
 * @since 2021-10-02
 */
@Data
public class PatientHomeDataDTO {

    private static final long serialVersionUID = 1L;

    /**
     * 用户总分平均分
     */
    private Integer scoreAll;

    /**
     * 治疗进展平均分
     */
    private Integer scoreSub1;

    /**
     * 康复进展平均分
     */
    private Integer scoreSub2;

    /**
     * 当前进展
     */
    private Integer currentProcess;

    /**
     * 当前进展描述
     */
    private String currentProcessTip;


    public static PatientHomeDataDTO of(Integer scoreAvgSub1, Integer scoreAvgSub2) {
        PatientHomeDataDTO patientHomeDataDTO = new PatientHomeDataDTO();
        patientHomeDataDTO.setScoreSub1(scoreAvgSub1);
        patientHomeDataDTO.setScoreSub2(scoreAvgSub2);
        patientHomeDataDTO.setScoreAll((scoreAvgSub1 + scoreAvgSub2) / 2);
        return patientHomeDataDTO;
    }

    public PatientHomeDataDTO currentProcess(Integer currentProcess) {
        this.currentProcess = currentProcess;
        return this;
    }

}
